package fitness.com;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class fitness extends Activity {
    /** Called when the activity is first created. */
	

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
     
    }
    
    public boolean onCreateOptionsMenu(Menu menu){

		//menu.add(1,1,0,"Inicio");
		menu.add(2,2,0,"IMC");
		menu.add(3,3,0,"IMB");
		menu.add(4,4,0,"Test de cooper");
		menu.add(5,5,0,"Buenas resetas");
		menu.add(7,7,0,"acerca de.");
		
		
    	return true;
    }
    
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case 1:
        	
        	break;
        case 2:
        	Intent IMC = new Intent(fitness.this,IMC.class);
        	startActivity(IMC);
        	finish();
        	break;
        	
        case 3:
        	Intent imb = new Intent(fitness.this,imb.class);
        	startActivity(imb);
        	finish();
        	break;
        case 4:
        	Intent cooper = new Intent(fitness.this,cooper.class);
        	startActivity(cooper);
        	finish();
        	break;
        case 5:
        	Intent menu = new Intent(fitness.this,Menu.class);
        	startActivity(menu);
        	finish();
        
        case 7:
        	
        	AlertDialog.Builder dialogo = new AlertDialog.Builder(this);
            dialogo.setMessage("Desarrollado por:                Andrés A ,Jorge A ,Sebastian R.")
        	.setTitle("Acerca de..")
            .setIcon(R.drawable.icon)
        	.setCancelable(true);  
            
        	 AlertDialog alerta = dialogo.create();
             alerta.show();
             alerta.getButton(RESULT_OK);
             break;
            
        
    }   return false;
   
}}